package com.xiaoyilin.service.impl;

import com.xiaoyilin.proto.MessageServiceGrpc;
import com.xiaoyilin.proto.Request;
import com.xiaoyilin.proto.Response;
import io.grpc.stub.StreamObserver;

/**
 * @author Administrator
 */
public class GrpcServiceImpl extends MessageServiceGrpc.MessageServiceImplBase {

    @Override
    public void controlTerminal(Request request, StreamObserver<Response> responseObserver) {
        Response response = Response.newBuilder().setResult("id123").build();
        responseObserver.onNext(response);
        responseObserver.onCompleted();
    }


}
